package com.test.util;

import java.util.Random;

public class RandomStringUtil
{
	public static String getRandomString(int length)
	{

		final String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
		StringBuilder builder = new StringBuilder();
		Random random = new Random();
		for (int i = 0; i < length; i++)
		{
			builder.append(str.charAt(random.nextInt(62)));
		}
		return builder.toString();
	}

//	public static void main(String[] args)
//	{
//		System.out.println(getRandomString(10));
//	}
}